﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/MasterPage.master" CodeFile="ConceptosAdmin.aspx.cs" Inherits="Admin_ConceptosAdmin" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
        <h1 style="text-align: left">
            &nbsp;&nbsp;&nbsp; Administraci&oacute;n de Conceptos<asp:ScriptManager id="ScriptManager1"
                runat="server"></asp:ScriptManager></h1>

<table class="tablaForm" style=" width: 550px; text-align:left">
    <tr>
        <td class="tdCajas" align="right" colspan="3">Administraci&oacute;n de Conceptos</td></tr><tr><td style="WIDTH: 20%" class="tdForm" align="right">
            C&oacute;digo:&nbsp;</td><td style="WIDTH: 80%" class="tdForm" align="left"><asp:TextBox id="txtCodigo" runat="server" CssClass="cuadrotxt"></asp:TextBox></td>
    </tr>
    <tr>
        <td style="WIDTH: 20%; height: 23px;" class="tdForm" align="right">
            Concepto:&nbsp;</td><td style="WIDTH: 80%; height: 23px;" class="tdForm" align="left">
            <asp:TextBox id="txtConcepto" runat="server" CssClass="cuadrotxt100"></asp:TextBox> 
        </td>
        </tr>
    <tr>
        <td align="right" class="tdForm" style="width: 20%; height: 23px">
            Cod. Ex.:
        </td>
        <td align="left" class="tdForm" style="width: 80%; height: 23px">
            <asp:TextBox ID="txtCodEx" runat="server" Columns="8" MaxLength="8" Width="100px"></asp:TextBox></td>
    </tr>
    <tr>
        <td align="right" class="tdForm" style="width: 20%; height: 23px">
        </td>
        <td align="left" class="tdForm" style="width: 80%; height: 23px">
            <asp:RadioButton ID="rdbEgresos" runat="server" Text="Egresos" ValidationGroup="vgConceptos" AutoPostBack="True" CausesValidation="True" OnCheckedChanged="rdbEgresos_CheckedChanged" />
            <asp:RadioButton ID="rdbIngresos" runat="server" Text="Ingresos" ValidationGroup="vgConceptos" AutoPostBack="True" CausesValidation="True" OnCheckedChanged="rdbIngresos_CheckedChanged" />
            <asp:RadioButton ID="rdbTodos" runat="server" Text="Todos" ValidationGroup="vgConceptos" AutoPostBack="True" CausesValidation="True" OnCheckedChanged="rdbTodos_CheckedChanged" /></td>
    </tr>
    <tr>
        <td class="tdBotones" colspan="2">
            <asp:Button id="btnBuscar" onclick="btnBuscar_Click" runat="server" Text="Buscar" Width="75px"></asp:Button>
            <asp:Button id="btnNuevo" onclick="btnNuevo_Click" runat="server" Text="Nuevo" Width="75px"></asp:Button> 
            <asp:Button id="btnCancelar" onclick="btnCancelar_Click" runat="server" Text="Cancelar" Width="75px"></asp:Button>
            </td>
    </tr>
    <tr>
        <td style="WIDTH: 550px" colspan="3">
            <asp:GridView id="gvConceptos" runat="server" BorderWidth="1px" BackColor="White" Width="100%" OnPageIndexChanging="gvConceptos_PageIndexChanging" 
                OnSelectedIndexChanged="gvConceptos_SelectedIndexChanged" CellPadding="3" AllowPaging="True" AutoGenerateColumns="False" 
                DataKeyNames="Id_Concepto" BorderColor="#999999" BorderStyle="None" GridLines="Vertical" OnRowDeleting="gvConceptos_RowDeleting">
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black"></FooterStyle>
                <columns>
                     <asp:TemplateField HeaderText="Tipo">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Tipo" runat="server" Text='<%# Bind("Tipo") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="C&#243;digo">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Código" runat="server" Text='<%# Bind("Id_Concepto") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Cod. Ex.">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="CodEx" runat="server" Text='<%# Bind("CodEx") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="Concepto">
                        <HeaderStyle ForeColor="White" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label id="Titular" runat="server" Text='<%# Bind("Concepto") %>'></asp:Label> 
                        </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <HeaderStyle ForeColor="White"></HeaderStyle>
                        <ItemTemplate>
                            <asp:LinkButton runat="server" Text="Seleccionar" CommandName="Select" CausesValidation="False" id="LinkButton2"></asp:LinkButton>
                        </ItemTemplate>
                        </asp:TemplateField>
                </columns>
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center"></RowStyle>
                <EditRowStyle Wrap="True"></EditRowStyle>
                <SelectedRowStyle BackColor="#008A8C" ForeColor="White" Font-Bold="True"></SelectedRowStyle>
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"></PagerStyle>
                <HeaderStyle BackColor="#325FB9" ForeColor="White" Font-Names="Arial Rounded MT Bold" Font-Bold="True"></HeaderStyle>
                <AlternatingRowStyle BackColor="Gainsboro"></AlternatingRowStyle>
            </asp:GridView>
            </td>
            </tr>
        </table><br /><br />
    </div>
     <asp:Panel ID="pTipo" runat="server" CssClass="tdBotones" Style="display: none" Width="233px">
        <div style="text-align:center; background-image: none; background-color: transparent;">
            Debe especificar Egreso o Ingreso<br />
            <br />
            <asp:Button ID="btnOkTipo" runat="server" Text="OK" Width="64px"/>
        </div>
    </asp:Panel>
       <table border="0" id = "OcultarTipo" runat="server" style="width: 0px; height: 0px">
            <tr>
                <td style="width: 100px; height: 18px;">
                    <asp:Button ID="Button3" runat="server" Text="Button" Height="0px" Width="0px" />
                </td>
            </tr>
        </table>          
    <cc1:ModalPopupExtender ID="mpeTipo" runat="server" backgroundcssclass="modalBackground"
        dropshadow="true" okcontrolid="btnOkTipo" popupcontrolid="pTipo" targetcontrolid="Button3">
    </cc1:ModalPopupExtender>
    
</asp:Content>

